using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
    [Table("bgm_project_job_assignee"), DataContract]
    public class ProjectJobAssignee
    {

        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "BgmProjJobAssigneeId", ResourceType = typeof(Resources.ProjectJobAssigneeResource))]
        [Column("bgm_proj_job_assignee_seq", TypeName="int")]
        public int BgmProjJobAssigneeId { get; set; }

        [ForeignKey("BgmProjJobAssign")]
        [DataMember, Display(Name = "BgmProjJobAssignId", ResourceType = typeof(Resources.ProjectJobAssigneeResource))]
        [Column("bgm_proj_job_assign_seq", TypeName="int")]
        public int BgmProjJobAssignId { get; set; }

        [ForeignKey("Emp")]
        [DataMember, Display(Name = "EmpId", ResourceType = typeof(Resources.ProjectJobAssigneeResource))]
        [Column("emp_seq", TypeName="int")]
        public int EmpId { get; set; }

        [DataMember, Display(Name = "JobRemark", ResourceType = typeof(Resources.ProjectJobAssigneeResource))]
        [Column("job_remark", TypeName="ntext")]
        public string JobRemark { get; set; }

        [DataMember]
        public virtual ProjectJobAssignment BgmProjJobAssign { get; set; }

        [DataMember]
        public virtual HRM.Employee Emp { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
        [Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}